#ifndef CACHEUPLOADINFO_H
#define CACHEUPLOADINFO_H

#include <QObject>

class CacheUploadInfo : public CacheBase
{
    Q_OBJECT
private:
    static constexpr const char* s_idKey = "Id";
    static constexpr const char* s_infoKey = "Value1";
    static constexpr const char* s_stateKey = "Value2";
    static constexpr const char* s_uploadInfoTableName = "Data1";
    static constexpr const char* s_userInfoTableCreateCmd = "\
                                            CREATE TABLE  IF NOT EXISTS Data1\
                                            ( \
                                            Id INTEGER PRIMARY KEY   AUTOINCREMENT,\
                                            Value1 TEXT NOT NULL, \
                                            Value2 TEXT NOT NULL \
                                            )";
    DataBaseInterface *m_dataBaseInterface;
public:
    CacheUploadInfo();
public:
    void createTable();
    void recvInfo(const QString &info);
    void getInfo(QList<qlonglong> &id,QList<QString> &info,QList<QString> status,const int32_t &num);
    void deleteInfo(QList<qlonglong> &id);
private:
    bool saveInfo(const QList<QString> &info);
};

#endif // CACHEUPLOADINFO_H
